﻿// Author: Wilfred Pinto
// Website: http://projectsilverlight.blogspot.com

using SimpleViewer_SL.code;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

#pragma warning disable 1591

namespace SimpleViewer_SL
{
    /// <summary>
    /// The main entry point for the SimpleViewer-SL application
    /// </summary>
    public partial class App : Application
    {
        /// <summary>
        /// An instance of the <c>InitializationSettings</c> object 
        /// </summary>
        public InitializationSettings Settings { get; set; }

        public App()
        {
            this.Startup += this.Application_Startup;
            this.Exit += this.Application_Exit;
            this.UnhandledException += this.Application_UnhandledException;

            InitializeComponent();
        }

        private void Application_Startup(object sender, StartupEventArgs e)
        {
            // Load initialization parameters
            Settings = new InitializationSettings();
            Settings.LoadInitializationParams(e);

            // Load the main control
            this.RootVisual = new Page();
        }

        private void Application_Exit(object sender, EventArgs e)
        {
        }

        private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
        {
        }
    }
}
